package com.ruoyi.robot.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.robot.mapper.UserChatDataMapper;
import com.ruoyi.robot.domain.UserChatData;
import com.ruoyi.robot.service.IUserChatDataService;

/**
 * 机器人对话历史记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-22
 */
@Service
public class UserChatDataServiceImpl implements IUserChatDataService 
{
    @Autowired
    private UserChatDataMapper userChatDataMapper;

    public List<UserChatData> getHistoryChatList(UserChatData userChatData)
    {
        return userChatDataMapper.getHistoryChatList(userChatData);
    }
    /**
     * 查询机器人对话历史记录
     * 
     * @param name 机器人对话历史记录主键
     * @return 机器人对话历史记录
     */
    @Override
    public UserChatData selectUserChatDataByName(String name)
    {
        return userChatDataMapper.selectUserChatDataByName(name);
    }

    /**
     * 查询机器人对话历史记录列表
     * 
     * @param userChatData 机器人对话历史记录
     * @return 机器人对话历史记录
     */
    @Override
    public List<UserChatData> selectUserChatDataList(UserChatData userChatData)
    {
        return userChatDataMapper.selectUserChatDataList(userChatData);
    }

    /**
     * 新增机器人对话历史记录
     * 
     * @param userChatData 机器人对话历史记录
     * @return 结果
     */
    @Override
    public int insertUserChatData(UserChatData userChatData)
    {
        return userChatDataMapper.insertUserChatData(userChatData);
    }

    /**
     * 修改机器人对话历史记录
     * 
     * @param userChatData 机器人对话历史记录
     * @return 结果
     */
    @Override
    public int updateUserChatData(UserChatData userChatData)
    {
        return userChatDataMapper.updateUserChatData(userChatData);
    }

    /**
     * 批量删除机器人对话历史记录
     * 
     * @param names 需要删除的机器人对话历史记录主键
     * @return 结果
     */
    @Override
    public int deleteUserChatDataByNames(String[] names)
    {
        return userChatDataMapper.deleteUserChatDataByNames(names);
    }

    /**
     * 删除机器人对话历史记录信息
     * 
     * @param name 机器人对话历史记录主键
     * @return 结果
     */
    @Override
    public int deleteUserChatDataByName(String name)
    {
        return userChatDataMapper.deleteUserChatDataByName(name);
    }
}
